import 'package:flutter_taotaoshipin/generated/json/base/json_convert_content.dart';
import 'package:flutter_taotaoshipin/model/user_reg_entity.dart';

UserRegEntity $UserRegEntityFromJson(Map<String, dynamic> json) {
  final UserRegEntity userRegEntity = UserRegEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    userRegEntity.id = id;
  }
  final String? user = jsonConvert.convert<String>(json['user']);
  if (user != null) {
    userRegEntity.user = user;
  }
  final String? pwd = jsonConvert.convert<String>(json['pwd']);
  if (pwd != null) {
    userRegEntity.pwd = pwd;
  }
  return userRegEntity;
}

Map<String, dynamic> $UserRegEntityToJson(UserRegEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['user'] = entity.user;
  data['pwd'] = entity.pwd;
  return data;
}

extension UserRegEntityExtension on UserRegEntity {
  UserRegEntity copyWith({
    int? id,
    String? user,
    String? pwd,
  }) {
    return UserRegEntity()
      ..id = id ?? this.id
      ..user = user ?? this.user
      ..pwd = pwd ?? this.pwd;
  }
}